import React, {Component, lazy, Suspense} from 'react';
import {BrowserRouter as Router, Redirect, Route as NoAuthRoute, Switch} from 'react-router-dom'
// import Route from './PrivateRoute'
import { Spin } from "antd";
// import Login from "../components/login";
// import MainLayout from "../components/main/layout/MainLayout";
import asyncComponent from './AsyncComponent';

/** webpackChunkName是打包出来的js文件名 */

export const Login = asyncComponent(() => (
    import(/* webpackChunkName: 'login' */ '../components/login')
  )
);

export const MainLayout = asyncComponent(() => (
    import(/* webpackChunkName: 'MainLayout' */ '../components/main/layout/MainLayout')
  )
);

export const HomePage = asyncComponent(() => (
    import(/* webpackChunkName: 'homePage' */ '../components/homePage')
  )
);

export const IndexView = asyncComponent(() => (
    import(/* webpackChunkName: 'IndexView' */ '../configs/IndexView')
  )
);


export const Demo = asyncComponent(() => (
    import(/* webpackChunkName: 'Demo' */ '../commons/components/Demo')
  )
);

export const CorporationTable = asyncComponent(() => (
    import(/* webpackChunkName: 'CorporationTable' */ '../components/baf/Corporation/CorporationTable')
  )
);

export const OrganizationView = asyncComponent(() => (
    import(/* webpackChunkName: 'OrganizationView' */ '../components/baf/Organization/OrganizationView')
  )
);

export const PositionCategoryTable = asyncComponent(() => (
    import(/* webpackChunkName: 'PositionCategoryTable' */ '../components/baf/PositionCategoryManagement/PositionCategoryTable')
  )
);

export const PositionView = asyncComponent(() => (
    import(/* webpackChunkName: 'PositionView' */ '../components/baf/Position/PositionView')
  )
);

export const CountryTable = asyncComponent(() => (
    import(/* webpackChunkName: 'CountryTable' */ '../components/baf/Country/CountryTable')
  )
);

export const RegionView = asyncComponent(() => (
    import(/* webpackChunkName: 'RegionView' */ '../components/baf/Region/RegionView')
  )
);

export const ProfessionalDomainView = asyncComponent(() => (
    import(/* webpackChunkName: 'ProfessionalDomainView' */ '../components/baf/ProfessionalDomain/ProfessionalDomainView')
  )
);

export const AppModuleTable = asyncComponent(() => (
    import(/* webpackChunkName: 'AppModuleTable' */ '../components/baf/AppModule/AppModuleTable')
  )
);

export const AuthorizeEntityTypeTable = asyncComponent(() => (
    import(/* webpackChunkName: 'AuthorizeEntityTypeTable' */ '../components/baf/AuthorizeEntityType/AuthorizeEntityTypeTable')
  )
);

export const DataAuthorizeTypeTable = asyncComponent(() => (
    import(/* webpackChunkName: 'DataAuthorizeTypeTable' */ '../components/baf/DataAuthorizeType/DataAuthorizeTypeTable')
  )
);

export const TenantTable = asyncComponent(() => (
    import(/* webpackChunkName: 'TenantTable' */ '../components/baf/Tenant/TenantTable')
  )
);

export const FeatureView = asyncComponent(() => (
    import(/* webpackChunkName: 'FeatureView' */ '../components/baf/Feature/FeatureView')
  )
);

export const FeatureRoleView = asyncComponent(() => (
    import(/* webpackChunkName: 'FeatureRoleView' */ '../components/baf/FeatureRole/FeatureRoleView')
  )
);

export const DataAuthorizationView = asyncComponent(() => (
    import(/* webpackChunkName: 'DataAuthorizationView' */ '../components/baf/DataAuthorization/DataAuthorizationView')
  )
);

export const MenuView = asyncComponent(() => (
    import(/* webpackChunkName: 'MenuView' */ '../components/baf/Menu/MenuView')
  )
);

export const EnterpriseUserView = asyncComponent(() => (
    import(/* webpackChunkName: 'EnterpriseUserView' */ '../components/baf/EnterpriseUser/EnterpriseUserView')
  )
);

export const SupplierUserTable = asyncComponent(() => (
    import(/* webpackChunkName: 'SupplierUserTable' */ '../components/baf/SupplierUser/SupplierUserTable')
  )
);

export const ExpertUserTable = asyncComponent(() => (
    import(/* webpackChunkName: 'ExpertUserTable' */ '../components/baf/ExpertUser/ExpertUserTable')
  )
);

export const DataRoleManagerView = asyncComponent(() => (
    import(/* webpackChunkName: 'DataRoleManagerView' */ '../components/baf/DataRole/DataRoleManagerView')
  )
);

export const Test = asyncComponent(() => (
    import(/* webpackChunkName: 'Test' */ '../components/main/layout/Test')
  )
);

export const UserSetting = asyncComponent(() => (
    import(/* webpackChunkName: 'userSetting' */ '../components/userSetting')
  )
);

export const NoAuthorized = asyncComponent(() => (
    import(/* webpackChunkName: 'noAuthorized' */ '../components/noAuthorized')
  )
);

export const DataDictionary = asyncComponent(() => (
    import(/* webpackChunkName: 'dataDictionary' */ '../components/baf/dataDictionary')
  )
);

